from flask import Flask, request, make_response, redirect, abort, render_template

app = Flask(__name__)

@app.route('/comments/')
def comments():
    comments = [
        {
            'user': u'admin',
            'content': 'xxxx'
        },
        {
            'user': u'tesr',
            'content': 'xxxx'
        }
    ]
    avatar = 'https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=d&word=saber&hs=2&pn=8&spn=0&di=90970&pi=0&rn=1&tn=baiduimagedetail&is=0%2C0&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=2455317008%2C3977294981&os=1910965820%2C824202090&simid=0%2C0&adpicid=0&lpn=0&ln=30&fr=ala&fm=&sme=&cg=&bdtype=0&oriquery=saber&objurl=http%3A%2F%2Fi0.hdslb.com%2Fbfs%2Farticle%2F37dca8692f4b2726ea86899944ffcaa3c2dcb379.jpg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Bktstktst_z%26e3Bv54AzdH3F6jw1AzdH3Fve880addmAzdH3F&gsm=1&islist=&querylist='
    return render_template('comments.html',comments=comments,avatar=avatar)

if __name__ == '__main__':
    app.run(debug=True)